﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Benefit.Service.ServerData
{
    public class ServiceT_Exchange : Benefit.Interface.ServerData.IT_Exchange
    {
        Benefit.DB.DBManager db = null;
        public ServiceT_Exchange(Benefit.DB.DBManager db)
        {
            this.db = db;
        }

        /// <summary>
        /// 得到所有交易所
        /// </summary>
        /// <returns></returns>
        public List<Models.ServerData.T_Exchange> GetList()
        {
            DavidDB.ADO.DBManager dbmanager = new DavidDB.ADO.DBManager();
            List<Models.ServerData.T_Exchange> exchanges = new List<Models.ServerData.T_Exchange>();
            List<object> objs = dbmanager.GetList(new Models.ServerData.T_Exchange());
            foreach (Models.ServerData.T_Exchange ec in objs)
            {
                exchanges.Add(ec);
            }
            dbmanager.Commit();
            dbmanager.Dispose();
            return exchanges;
        }
    }
}
